﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Demonstartor
{
    class DateTimeValuesList: List<DateTimeValues>
    {
        public DateTimeValuesList()
            : base()
        {

        }

        public void Split(DateTime DT)
        {
            for (int i = 0; i < Count; i++)
            {
                if (this[i].InInterval(DT))
                {
                    DateTimeValues[] SP = this[i].Split(DT);
                    this.RemoveAt(i);
                    this.Insert(i, SP[1]);
                    this.Insert(i, SP[0]);
                }
            }
        }
    }
}
